﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Tank
{
    /// <summary>
    /// 游戏地图类
    /// </summary>
    public class GameMap
    {
        #region 构造函数

        public GameMap()
        {
        }

        #endregion

        #region 游戏关卡布局

        /// <summary>
        /// 游戏关卡布局
        /// </summary>
        /// <param name="TMap"></param>
        /// <returns></returns>
        public static int[,] GetGameMap(GameLevel level)
        {
            switch (level)
            {
                case GameLevel.Level_01:
                    Map_Lv_01();
                    break;
                default:
                    break;
            }

            return Map;
        }
        /// <summary>
        /// 地图：关卡一
        /// </summary>
        private static void Map_Lv_01()
        {
            Map = new int[13, 10];
            for (int y = 0; y <= 9; y++)
            {
                for (int x = 0; x <= 12; x++)
                {
                    Map[x, y] = 0;
                    if ((y > 0 && y < 4) || (y > 5 && y < 9))
                    {
                        if (x % 2 != 0)
                        {
                            Map[x, y] = 1;
                        }
                    }
                }
            }
            Map[6, 2] = 2;
            Map[6, 6] = 1;
            Map[0, 6] = 2;
            Map[12, 6] = 2;
            Map[5, 8] = 0;
            Map[7, 8] = 0;
        }

        #endregion

        #region 游戏地图属性

        /// <summary>
        /// 游戏地图
        /// </summary>
        public static int[,] Map { get; set; }

        #endregion
    }
}
